package com.shenghui.enterprise.base.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shenghui.enterprise.base.entity.BaseDataDictionaryDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description: 字典子表数据访问接口
 * @Author houjh
 * @Email: happyxiaohou@gmail.com
 * @Date: 2020-06-01
 * @Copyright (c) 2020-2022 云南昇晖科技有限公司
 */
@Mapper
public interface BaseDataDictionaryDetailMapper extends BaseMapper<BaseDataDictionaryDetail> {
    /**
     * 数据字典详情列表
     */
    List<Map> getDataDictionaryDetailList(Page page, @Param("map") Map map);

    /**
     * 根据父级字典code查询子字典列表
     * @param map
     * @return
     */
    List<Map> getDataDictionaryDetailListByParentCode(Page page, @Param("map") Map map);

    /**
     * 通过id查询字典详情信息
     * @param id
     * @return
     */
    Map<String,Object> getDictionaryDetailById(@Param("id") String id);

    /**
     * 通过code查询字典详情
     * @param dataDictionaryCode
     * @param dataDictionaryDetailCode
     * @return
     */
    BaseDataDictionaryDetail getDicDetailByCode(@Param("dataDictionaryCode") String dataDictionaryCode, @Param("dataDictionaryDetailCode") String dataDictionaryDetailCode);
}